<div class="bg-light lter b-b wrapper-md">
    <h1 class="m-n font-thin h3"><span class="font-bold" translate="aside.nav.query.surger"></span></h1>
</div>
<div ng-class="isSmart?'':'wrapper-md'" class="remove-wrapper">
    <div class="panel panel-default" style="margin-bottom: 0;">
        <div ng-controller="QueryPaymentOperationController" ng-init="init()">
            <form  class="form-horizontal" style="padding-bottom: 10px;padding-top: 10px;">
                <div class="row">
                    <div ng-controller="DatepickerDemoCtrl" class="col-xs-12 col-md-5" style="margin-bottom:5px;">
                        <div class="col-xs-12 col-sm-4">
                            <label class="control-label" translate="business.servreq.paid_startdate"></label>
                        </div>
                        <div class="col-xs-12 col-sm-8">
                            <div class="input-group">
							<span class="input-group-btn" ng-click="open($event)">
								<button class="btn btn-default">
									<i class="glyphicon glyphicon-calendar"></i>
								</button>
							</span>
                                <input type="text" class="form-control text-center" style="min-width: 100px"
                                       datepicker-popup="yyyy-MM-dd"
                                       is-open="opened"
                                       current-text="{{'common.today' | translate}}"
                                       clear-text="{{'common.clear' | translate}}"
                                       close-text="{{'common.close' | translate}}"
                                       datepicker-options="dateOptions"
                                       ng-required="true"
                                       close-text="Close"
                                       ng-model="item.startDate"
                                       max-date="item.finishDate"
                                       disabled
                                       autocomplete="off">
                            </div>
                        </div>
                    </div>
                    <div ng-controller="DatepickerDemoCtrl" class="col-xs-12 col-md-5" style="margin-bottom:5px;">
                        <div class="col-xs-12 col-sm-4">
                            <label class="control-label" translate="business.servreq.paid_enddate"></label>
                        </div>
                        <div class="col-xs-12 col-sm-8">
                            <div class="input-group">
							<span class="input-group-btn" ng-click="open($event)">
								<button class="btn btn-default">
									<i class="glyphicon glyphicon-calendar"></i>
								</button>
							</span>
                                <input type="text" class="form-control text-center" style="min-width: 100px"
                                       datepicker-popup="yyyy-MM-dd"
                                       is-open="opened"
                                       current-text="{{'common.today' | translate}}"
                                       clear-text="{{'common.clear' | translate}}"
                                       close-text="{{'common.close' | translate}}"
                                       datepicker-options="dateOptions"
                                       ng-required="true"
                                       close-text="Close"
                                       ng-model="item.finishDate"
                                       min-date="item.startDate"
                                       max-date="dt"
                                       disabled
                                       autocomplete="off">
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-12 col-md-2">
                        <div class="col-xs-12">
                            <button class="btn btn-success font-bold" translate="business.navtitle.search_patient" ng-click="query()"></button>
                        </div>
                    </div>
                </div>
            </form>
            <div style="padding: 10px;">
                <table class="table table-bordered" style="background:#FFF;">
                    <tbody ng-repeat="hospFee in hospFees">
                    <tr>
                        <td colspan="8" style="border:none">
                            <span>{{selectLang == 'English' ? hospFee.hosp.hosp_En_Name : hospFee.hosp.hosp_Cn_Name}}</span>
                            <br></td>
                    </tr>
                    <tr class="panel-heading" style="font-weight:bold">
                        <td translate="common.number" class="text-center">No.</td>
                        <td translate="common.name" class="text-center">Username</td>
                        <td ng-if="!isSmart" translate="user.icNo" class="text-center">Real Name</td>
                        <td translate="business.patcase.disease_type" class="text-center"></td>
                        <td translate="business.servreq.amount_Operation" class="text-center"></td>
                        <td ng-if="!isSmart" translate="business.servreq.paid_Date" class="text-center"></td>
                        <td ng-if="!isSmart" translate="business.servreq.medFinance" class="text-center"></td>
                    </tr>
                    <tr ng-repeat="servReq in hospFee.servReqs">
                        <td class="text-center">{{ $index + 1 }}</td>
                        <td class="text-center">{{servReq._patCase._patient._user.realName}}</td>
                        <td ng-if="!isSmart" class="text-center">{{servReq._patCase._patient._user.icNo}}</td>
                        <td class="text-center"
                            translate="{{'business.patcase.disease_type_' + servReq._diseaseType.desc}}"></td>
                        <td ng-if="!isSmart" class="text-center">{{servReq.amount_Operation | currency:'￥'}}</td>
                        <td ng-if="!isSmart" class="text-center">{{ moment(servReq.paid_Operation_Date).format('YYYY-MM-DD') }}</td>
                        <td class="text-center">{{servReq._med_Finance.realName}}</td>
                    </tr>
                    <tr>
                        <td translate="common.summary" class="text-center"></td>
                        <td class="text-center"></td>
                        <td ng-if="!isSmart" class="text-center"></td>
                        <td class="text-center"></td>
                        <td class="text-center">{{hospFee.amount_Operation | currency:'￥'}}</td>
                        <td ng-if="!isSmart" class="text-center"></td>
                        <td ng-if="!isSmart" class="text-center"></td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
